import { getShipNameOptions } from "@/api/options/options";

export const shipNameOptionsMixin = {
  data() {
    return {
      // 船名的options
      shipNameOptions: [],
    };
  },
  methods: {
    /**
     * 获取船名的options
     * @returns {Promise<void>}
     */
    async getShipNameOptions() {
      const response = await getShipNameOptions();
      this.shipNameOptions = response.data;
    }
  },
  created() {
    // 获取船名的options
    this.getShipNameOptions();
  },
};
